package com.hd.sup.modules.alarm.model;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 报警记录处置表
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sp_alarm_reord")
public class AlarmRecord extends Model<AlarmRecord> {

    private static final long serialVersionUID = 1L;

    //分页查询构造
    public AlarmRecord(String recordType, String alarmId) {
        this.recordType = recordType;
        this.alarmId = alarmId;
    }

    //插入构造
    public AlarmRecord(String id, String recordType, String fileUrl, String alarmId, String remark, String createBy) {
        this.id = id;
        this.recordType = recordType;
        this.fileUrl = fileUrl;
        this.alarmId = alarmId;
        this.remark = remark;
        this.createBy = createBy;
    }

    /**
     * 记录id
     */
    private String id;
    /**
     * 台账类型 | 0 处理记录 1 审核记录
     */
    @TableField("record_type")
    private String recordType;
    /**
     * t_alert表id  用于关联。重复则表示多条记录。
     */
    @TableField("alarm_id")
    private String alarmId;
    /**
     * 处理备注
     */
    private String remark;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 创建人
     */
    @TableField("create_by")
    private String createBy;
    /**
     * 处理图片路径
     */
    @TableField("file_url")
    private String fileUrl;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
